import request from '@/utils/request'

// 查询SAP车辆放行信息
export function listSAPPlateInfo(data) {
  return request({
    url: '/tms/ecDeliverVehicle/listSAPPlateInfo',
    method: 'post',
    data: data,
    timeout: 240000000
  })
}

// 同步SAP车辆放行信息
export function manualRelease(data) {
  return request({
    url: '/tms/ecDeliverVehicle/manualRelease',
    method: 'post',
    data: data
  })
}

// 车辆授信出门
export function vehicleReleaseCredit(data) {
  return request({
    url: '/releaseCredit/releaseCreditLimit/vehicleReleaseCredit',
    method: 'post',
    data: data
  })
}

export function queryReleaseCreditRecordByUser(query) {
  return request({
    url: '/releaseCredit/vehicleReleaseCreditRecord/queryReleaseCreditRecordByUser',
    method: 'get',
    params: query
  })
}

// 查询车辆出门授信记录详细
export function getVehicleReleaseCreditRecord(id) {
  return request({
    url: '/releaseCredit/vehicleReleaseCreditRecord/' + id,
    method: 'get'
  })
}